<?php

/**
 *
 * @license   https://www.rongyun.cc
 * @link      https://www.rongyun.cc
 * @author    wangyadong<wangyadong280@gmail.com>
 * @date      2017-05-11 18:04
 */

namespace  App\Models;

use Auth;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Tymon\JWTAuth\Contracts\JWTSubject as AuthenticatableUserContract;

class Users extends Authenticatable implements AuthenticatableUserContract
{

    protected $table = 'users';

    protected $primaryKey = 'id';
    // 查询用户的时候，不暴露密码
    protected $hidden = ['password'];

    /**
     * @return mixed
     */
    public function getJWTIdentifier()
    {
        return $this->getKey(); // Eloquent model method
    }

    /**
     * @return array
     */
    public function getJWTCustomClaims()
    {
        return [];
    }
}